<!-- MAIN -->
<div class="main">
    <!-- MAIN CONTENT -->
    <div class="main-content">
        <div class="container-fluid">
            <div class="pd10 panel mb20">
                <h4 class="tit1 ftl"><span class="blue">所有者信息</span><span class="fz14">（诊所最高负责人为所有者）</span><button class="btn btn-primary r chlinicEidt" type="button">编辑</button></h4>
                <ul class="list-unstyled list-justify mt10">
                    <li>所有者姓名：{$hospitalInfo['owner_name']}</li>
                    <li>职务：院长</li>
                    <!--<li>职务：{$hospitalInfo['owner_post']}</li>-->
                    <!--<li>所有者手机号：{$hospitalInfo['owner_mobile']}</li>-->
                </ul>
            </div>
            <div class="panel pd10">
                <h4 class="tit1 ftl"><span class="blue">诊所信息</span><span class="fz14">（关于诊所的基本信息及最大成员数量）</span></h4>
                <ul class="list-unstyled list-justify mt10 clinicForm on">
                    <li>
                        <div class="input-group listSeaForm">
							<span class="input-group-btn">
								<span class="btn">诊所名称：</span>
							</span>
                            <span class="ml10">{$hospitalInfo['hospital_name']}</span>
                        </div>
                    </li>
                    <li>
                        <div class="input-group listSeaForm">
							<span class="input-group-btn">
								<span class="btn">医生数量：</span>
							</span>
                            <span class="ml10">{$doctorCount}</span>
                        </div>
                    </li>
                    <li>
                        <div class="input-group listSeaForm">
							<span class="input-group-btn">
								<span class="btn">诊所科室：</span>
							</span>
                            <foreach name="currentDepartment" item="department">
                                <span class="ml10">{$department['department_name']}</span>
                            </foreach>
                        </div>
                    </li>
                    <li>
                        <div class="input-group listSeaForm">
							<span class="input-group-btn">
								<span class="btn">专业方向：</span>
							</span>
                            <input class="form-control" type="text" value="{$hospitalInfo['major_field']}" name="major_field">
                        </div>
                    </li>
                    <li>
                        <div class="input-group listSeaForm">
							<span class="input-group-btn">
								<span class="btn">诊所地址：</span>
							</span>
                            <input class="form-control" type="text" value="{$hospitalInfo['address']}" name="address">
                        </div>
                    </li>
                    <li>
                        <div class="listSeaForm">
							<span class="input-group-btn">
								<span class="btn">诊所简介：</span>
							</span>
                            <textarea class="form-control" id="introduction" style="display: block;" rows="8" maxlength="500" name="introduction">{$hospitalInfo['introduction']}</textarea>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <!-- END MAIN CONTENT -->
</div>
<!-- END MAIN -->
<script>
    $(function () {
        $(document).on('click', '.chlinicEidt', function (){
            if ($('.clinicForm').hasClass('on')) {
                $(this).text('保存');
                $('.clinicForm').removeClass('on').find('input,textarea').removeAttr('disabled');
            } else {
                $(this).text('编辑');
                $('.clinicForm').addClass('on').find('input,textarea').attr('disabled', true);
                var major_field = $(":input[name='major_field']").val();
                var address = $(":input[name='address']").val();
                var introduction = $("#introduction").val();
                $.post("{:U('/Member/myHospitalInfo')}",
                    { "major_field": major_field,'address':address,'introduction':introduction},
                    function (data) {
                        if (data.status=='success') {
                            location.reload();
                        }
                        remindBox(data.msg);
                    },
                    "json");
            }
        });
    });
</script>